Skip to content

feat: support bundle and load css in external bundle#2143

Merged
colinaaa merged 20 commits intomainfrom
feat/rslib-css
Mar 4, 2026
Merged

feat: support bundle and load css in external bundle#2143
colinaaa merged 20 commits intomainfrom
feat/rslib-css

Conversation

@upupming
Copy link
Copy Markdown
Collaborator

@upupming upupming commented Jan 27, 2026

Summary by CodeRabbit

  • New Features

    • Support for bundling and loading CSS in external bundles, including main-thread stylesheet adoption and flush handling
    • Example updated to ensure external CSS loads reliably; CSS handling now applied unconditionally
  • Bug Fixes

    • Improved error logging for external bundle load failures
  • Tests

    • Added tests and fixtures to verify CSS is included and decoded in external bundles
  • Chores

    • Dependency updates to support CSS serialization and parsing

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: a80ede6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 5 packages
Name Type
@lynx-js/externals-loading-webpack-plugin Patch
@lynx-js/lynx-bundle-rslib-config Patch
@lynx-js/react-rsbuild-plugin Patch
@lynx-js/external-bundle-rsbuild-plugin Patch
@lynx-js/react-alias-rsbuild-plugin Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Jan 27, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Adds CSS extraction, serialization, and runtime loading for external bundles: encoder emits CSS custom-sections, React plugin loader behavior updated, externals runtime loads/adopts styles on main-thread, and deps/tests/examples updated to cover CSS in external bundles.

Changes

Cohort / File(s) Summary
Changeset
/.changeset/thick-needles-rest.md
Adds a changeset declaring patch releases for three packages with note "Support bundle and load css in external bundle".
Examples
examples/react-externals/src/index.css, examples/react-externals/src/index.tsx
Adds minimal CSS to trigger engine load and switches the example import to the new CSS file.
Dependencies
packages/rspeedy/lynx-bundle-rslib-config/package.json, packages/webpack/template-webpack-plugin/package.json
Adds @lynx-js/css-serializer and bumps @lynx-js/tasm to 0.0.26.
External bundle encoder
packages/rspeedy/lynx-bundle-rslib-config/src/webpack/ExternalBundleWebpackPlugin.ts
Encodes extracted CSS into :CSS custom-sections (uses cssChunksToMap → ruleList) and enables CSS-related compiler options.
Tests & fixtures
packages/rspeedy/lynx-bundle-rslib-config/test/external-bundle.test.ts, packages/rspeedy/lynx-bundle-rslib-config/test/fixtures/css-lib/*
Adds css-lib fixture (CSS + TS) and a test asserting external bundle includes index, index:CSS, and index__main-thread.
React plugin CSS handling
packages/rspeedy/plugin-react/src/css.ts, packages/rspeedy/plugin-react/src/pluginReactLynx.ts
Removes built-in ignore-css loader, ensures MiniCssExtract is registered earlier, reorders custom loader insertion, and calls applyCSS unconditionally.
Externals runtime & test env
packages/webpack/externals-loading-webpack-plugin/src/index.ts, packages/webpack/externals-loading-webpack-plugin/test/helpers/setup-env.js
Adds main-thread layer detection and runtime calls to load/adopt/flush styles; improves error logging and stubs __LoadStyleSheet, __AdoptStyleSheet, __FlushElementTree in test env.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~30 minutes

Possibly related PRs

Suggested reviewers

  • colinaaa
  • luhc228

Poem

🐇 I nibbled bytes and patched a seam,
Wove tiny rules into the bundle's dream,
Main-thread wakes the styled parade,
Leaves of CSS in a cozy braid,
Hop — the app dons a brand-new theme. 🎨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 14.29% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: support bundle and load css in external bundle' clearly and specifically describes the main feature being added across the changeset—enabling CSS bundling and loading in external bundles.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/rslib-css

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Jan 27, 2026

Merging this PR will improve performance by 7.69%

⚡ 2 improved benchmarks
✅ 70 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
basic-performance-nest-level-100 7.4 ms 6.9 ms +7.69%
transform 1000 view elements 44.9 ms 42.1 ms +6.5%

Comparing feat/rslib-css (a80ede6) with main (6cbe5d8)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@relativeci
Copy link
Copy Markdown

relativeci bot commented Jan 27, 2026

Web Explorer

#7945 Bundle Size — 383.53KiB (0%).

a80ede6(current) vs 651e5e2 main#7944(baseline)

Bundle metrics  Change 1 change
                 Current
#7945
     Baseline
#7944
No change  Initial JS 154.63KiB 154.63KiB
No change  Initial CSS 35.1KiB 35.1KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 238(+0.42%) 237
No change  Duplicate Modules 16 16
No change  Duplicate Code 2.99% 2.99%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7945
     Baseline
#7944
No change  JS 252.58KiB 252.58KiB
No change  Other 95.85KiB 95.85KiB
No change  CSS 35.1KiB 35.1KiB

Bundle analysis reportBranch feat/rslib-cssProject dashboard


Generated by RelativeCIDocumentationReport issue

@upupming upupming changed the base branch from main to feat/cssChunksToMap February 24, 2026 11:38
@upupming upupming marked this pull request as ready for review February 24, 2026 11:38
upupming added a commit that referenced this pull request Feb 25, 2026
…r` (#2269)

<!--
  Thank you for submitting a pull request!

We appreciate the time and effort you have invested in making these
changes. Please ensure that you provide enough information to allow
others to review your pull request.

Upon submission, your pull request will be automatically assigned with
reviewers.

If you want to learn more about contributing to this project, please
visit:
https://github.com/lynx-family/lynx-stack/blob/main/CONTRIBUTING.md.
-->

<!-- The AI summary below will be auto-generated - feel free to replace
it with your own. -->

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

## Release Notes

* **Bug Fixes**
* Patched @lynx-js/template-webpack-plugin and @lynx-js/css-serializer.

* **New Features**
  * Exposed CSS namespace directly from @lynx-js/css-serializer.
  * Added CSSPlugins export with parserPlugins property.
* Made cssChunksToMap available as a public export from
@lynx-js/css-serializer.

* **Chores**
* Updated test imports and configuration for improved module resolution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

In #2143, we need to use `cssChunksToMap` in
`@lynx-js/lynx-bundle-rslib-config` package.

To avoid repeating ourselves, we extract the `cssChunksToMap` API from
`@lynx-js/template-webpack-plugin` to `@lynx-js/css-serializer`.

## Checklist

<!--- Check and mark with an "x" -->

- [x] Tests updated (or not required).
- [ ] Documentation updated (or not required).
- [x] Changeset added, and when a BREAKING CHANGE occurs, it needs to be
clearly marked (or not required).
Base automatically changed from feat/cssChunksToMap to main February 25, 2026 09:03
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

♻️ Duplicate comments (1)
packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md (1)

19-24: No direct edit needed in generated API report.

This warning is a downstream artifact from packages/webpack/template-webpack-plugin/src/index.ts; fixing the source declaration is the right path.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md`
around lines 19 - 24, The API report flags CSSPlugins as missing a release tag;
update the source export for CSSPlugins in the module where it's declared by
adding a JSDoc release tag (e.g., /** `@public` */) above the export so the
generated declaration includes the tag, and ensure the related Plugins type used
in the CSSPlugins.parserPlugins typing is correctly exported/imported (symbols:
CSSPlugins, Plugins) so the API extractor can resolve types.
🧹 Nitpick comments (1)
packages/rspeedy/lynx-bundle-rslib-config/src/webpack/ExternalBundleWebpackPlugin.ts (1)

118-153: Prefer mutating the reducer accumulator to avoid repeated object cloning.

Line 118-Line 153 rebuilds prev with object spread on every asset. This creates avoidable O(n²)-style allocation churn for larger builds.

♻️ Suggested refactor
- const customSections = assets
-   .reduce<Record<string, { content: string | { ruleList: LynxStyleNode[] } }>>(
-     (prev, cur) => {
-       switch (cur.info['assetType']) {
-         case 'javascript':
-           return ({
-             ...prev,
-             [cur.name.replace(/\.js$/, '')]: {
-               content: cur.source.source().toString(),
-             },
-           })
-         case 'extract-css':
-           return ({
-             ...prev,
-             [`${cur.name.replace(/\.css$/, '')}:CSS`]: {
-               'encoding': 'CSS',
-               content: {
-                 ruleList: cssChunksToMap(
-                   [cur.source.source().toString()],
-                   [],
-                   true,
-                 ).cssMap[0] ?? [],
-               },
-             },
-           })
-         default:
-           return prev
-       }
-     },
-     {},
-   )
+ const customSections: Record<string, { content: string | { ruleList: LynxStyleNode[] } }> = {}
+ for (const cur of assets) {
+   switch (cur.info['assetType']) {
+     case 'javascript':
+       customSections[cur.name.replace(/\.js$/, '')] = {
+         content: cur.source.source().toString(),
+       }
+       break
+     case 'extract-css':
+       customSections[`${cur.name.replace(/\.css$/, '')}:CSS`] = {
+         encoding: 'CSS',
+         content: {
+           ruleList: cssChunksToMap([cur.source.source().toString()], [], true).cssMap[0] ?? [],
+         },
+       } as never
+       break
+     default:
+       break
+   }
+ }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/rspeedy/lynx-bundle-rslib-config/src/webpack/ExternalBundleWebpackPlugin.ts`
around lines 118 - 153, The reducer currently rebuilds the accumulator with
object spread on each iteration causing O(n²) allocations; in the reduce
callback (the function passed to .reduce in ExternalBundleWebpackPlugin) stop
returning new objects and instead mutate the accumulator `prev`: for
'javascript' set prev[cur.name.replace(/\.js$/, '')] = { content:
cur.source.source().toString() } and for 'extract-css' set
prev[`${cur.name.replace(/\.css$/, '')}:CSS`] = { encoding: 'CSS', content: {
ruleList: cssChunksToMap([cur.source.source().toString()], [], true).cssMap[0]
?? [] } }; then return prev; keep the reduce generic/typing for Record<string, {
content: string | { ruleList: LynxStyleNode[] } }> unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@examples/react-externals/src/index.css`:
- Line 8: The empty CSS rule `.dummy {}` is failing Stylelint's
`block-no-empty`; update the `.dummy` rule to be non-empty (e.g., add a harmless
declaration like `display: block;` or a comment/declaration that preserves the
trigger behavior) so the selector remains but the block no longer violates
`block-no-empty`; locate the `.dummy` rule in the CSS and add the single
non-empty declaration or comment inside it.

In `@packages/rspeedy/lynx-bundle-rslib-config/test/external-bundle.test.ts`:
- Around line 172-201: The test sets an environment stub via vi.stubEnv('DEBUG',
'rsbuild,rslib,rspack') but never restores it, causing cross-test leakage;
change the call to capture the returned restore function (e.g., const
restoreDebug = vi.stubEnv(...)) and call restoreDebug() after the
build/decode/assertions (or in a finally block) so the DEBUG env is reset for
subsequent tests; reference vi.stubEnv in the test around the
build(rslibConfig)/decodeTemplate(...)/assert expectations to locate where to
add the restore call.

In `@packages/webpack/externals-loading-webpack-plugin/src/index.ts`:
- Line 330: Replace the hard-coded '__main-thread' suffix used when deriving the
CSS section name with the configured mainThreadLayer value: instead of
sectionPath.replace('__main-thread', '') + ':CSS' use
sectionPath.replace(mainThreadLayer, '') + ':CSS' (apply the same change in both
the async and sync branches where __LoadStyleSheet is called), so that
__LoadStyleSheet(sectionPath.replace(mainThreadLayer, '') + ':CSS',
response.url) correctly resolves customized main thread layer names.
- Line 340: The catch path builds an Error message using error.message which can
throw if a non-Error (null/primitive) was thrown; replace the direct access with
a guarded conversion: derive a safeMessage by checking if error is an object
with a message property and using that, otherwise use String(error) (or a
default string), then construct the new Error with that safeMessage and set the
cause only when appropriate (or pass the original thrown value as cause if
supported). Apply the same guarded logic to both occurrences where reject(new
Error('Failed to load script ' + sectionPath + ' in ' + response.url + ': ' +
error.message, { cause: error })) is used so non-Error throws are handled
safely.

---

Duplicate comments:
In `@packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md`:
- Around line 19-24: The API report flags CSSPlugins as missing a release tag;
update the source export for CSSPlugins in the module where it's declared by
adding a JSDoc release tag (e.g., /** `@public` */) above the export so the
generated declaration includes the tag, and ensure the related Plugins type used
in the CSSPlugins.parserPlugins typing is correctly exported/imported (symbols:
CSSPlugins, Plugins) so the API extractor can resolve types.

---

Nitpick comments:
In
`@packages/rspeedy/lynx-bundle-rslib-config/src/webpack/ExternalBundleWebpackPlugin.ts`:
- Around line 118-153: The reducer currently rebuilds the accumulator with
object spread on each iteration causing O(n²) allocations; in the reduce
callback (the function passed to .reduce in ExternalBundleWebpackPlugin) stop
returning new objects and instead mutate the accumulator `prev`: for
'javascript' set prev[cur.name.replace(/\.js$/, '')] = { content:
cur.source.source().toString() } and for 'extract-css' set
prev[`${cur.name.replace(/\.css$/, '')}:CSS`] = { encoding: 'CSS', content: {
ruleList: cssChunksToMap([cur.source.source().toString()], [], true).cssMap[0]
?? [] } }; then return prev; keep the reduce generic/typing for Record<string, {
content: string | { ruleList: LynxStyleNode[] } }> unchanged.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9033e2d and bd1dfa6.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (27)
  • .changeset/thick-needles-rest.md
  • .changeset/wet-rockets-taste.md
  • examples/react-externals/src/index.css
  • examples/react-externals/src/index.tsx
  • packages/rspeedy/lynx-bundle-rslib-config/package.json
  • packages/rspeedy/lynx-bundle-rslib-config/src/webpack/ExternalBundleWebpackPlugin.ts
  • packages/rspeedy/lynx-bundle-rslib-config/test/external-bundle.test.ts
  • packages/rspeedy/lynx-bundle-rslib-config/test/fixtures/css-lib/index.css
  • packages/rspeedy/lynx-bundle-rslib-config/test/fixtures/css-lib/index.ts
  • packages/rspeedy/plugin-react/src/css.ts
  • packages/rspeedy/plugin-react/src/pluginReactLynx.ts
  • packages/tools/css-serializer/src/css/ast.ts
  • packages/tools/css-serializer/src/css/cssChunksToMap.ts
  • packages/tools/css-serializer/src/css/debundle.ts
  • packages/tools/css-serializer/src/css/index.ts
  • packages/tools/css-serializer/src/index.ts
  • packages/tools/css-serializer/test/css.test.ts
  • packages/tools/css-serializer/vitest.config.ts
  • packages/webpack/externals-loading-webpack-plugin/src/index.ts
  • packages/webpack/externals-loading-webpack-plugin/test/helpers/setup-env.js
  • packages/webpack/template-webpack-plugin/etc/template-webpack-plugin.api.md
  • packages/webpack/template-webpack-plugin/package.json
  • packages/webpack/template-webpack-plugin/src/LynxTemplatePlugin.ts
  • packages/webpack/template-webpack-plugin/src/WebEncodePlugin.ts
  • packages/webpack/template-webpack-plugin/src/css/index.ts
  • packages/webpack/template-webpack-plugin/src/index.ts
  • packages/webpack/template-webpack-plugin/src/web/genStyleInfo.ts
💤 Files with no reviewable changes (1)
  • packages/webpack/template-webpack-plugin/src/css/index.ts

Comment thread examples/react-externals/src/index.css
Comment thread packages/rspeedy/lynx-bundle-rslib-config/test/external-bundle.test.ts Outdated
Comment thread packages/webpack/externals-loading-webpack-plugin/src/index.ts
Comment thread packages/webpack/externals-loading-webpack-plugin/src/index.ts Outdated
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

♻️ Duplicate comments (2)
packages/webpack/externals-loading-webpack-plugin/src/index.ts (2)

341-341: ⚠️ Potential issue | 🟡 Minor

Harden catch-path message construction for non-Error throws.

Line 341 and Line 368 assume error.message exists; primitives/null can cause a second failure in error handling.

🛡️ Suggested fix
- reject(new Error('Failed to load script ' + sectionPath + ' in ' + response.url + ': ' + error.message, { cause: error }))
+ const reason = (error && typeof error === 'object' && 'message' in error)
+   ? String(error.message)
+   : String(error);
+ reject(new Error('Failed to load script ' + sectionPath + ' in ' + response.url + ': ' + reason, { cause: error }))
- throw new Error('Failed to load script ' + sectionPath + ' in ' + response.url + ': ' + error.message, { cause: error })
+ const reason = (error && typeof error === 'object' && 'message' in error)
+   ? String(error.message)
+   : String(error);
+ throw new Error('Failed to load script ' + sectionPath + ' in ' + response.url + ': ' + reason, { cause: error })

Also applies to: 368-368

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/webpack/externals-loading-webpack-plugin/src/index.ts` at line 341,
The catch-path builds a new Error using error.message which can throw if the
thrown value is null/primitive; replace uses of error.message in the reject(new
Error(..., { cause: error })) expression with a safe stringifier (e.g. const
safeMsg = (error && typeof error === 'object' && 'message' in error) ? (error as
Error).message : String(error)) and use safeMsg in the constructed message, and
optionally only pass cause when error is an Error instance (e.g. cause: error
instanceof Error ? error : undefined) to harden both occurrences that currently
reference error.message.

330-331: ⚠️ Potential issue | 🟠 Major

Use configured main-thread suffix for CSS section derivation.

Line 330 and Line 357 still hard-code __main-thread, so CSS lookup can fail when mainThreadLayer is customized.

🔧 Suggested fix
- const styleSheet = __LoadStyleSheet(sectionPath.replace('__main-thread', '') + ':CSS', response.url);
+ const mainThreadSuffix = '__${externalsLoadingPluginOptions.mainThreadLayer}';
+ const cssSectionPath = sectionPath.endsWith(mainThreadSuffix)
+   ? sectionPath.slice(0, -mainThreadSuffix.length)
+   : sectionPath;
+ const styleSheet = __LoadStyleSheet(cssSectionPath + ':CSS', response.url);

Also applies to: 357-358

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/webpack/externals-loading-webpack-plugin/src/index.ts` around lines
330 - 331, Replace the hard-coded "__main-thread" string with the configured
main-thread suffix (mainThreadLayer) when deriving the CSS section path: change
the calls that compute the CSS lookup (the sectionPath.replace('__main-thread',
'') + ':CSS' used before passing to __LoadStyleSheet) to remove the configured
mainThreadLayer instead of the literal, and apply the same change to the other
occurrence that currently uses "__main-thread"; ensure you remove only the
suffix instance of mainThreadLayer from sectionPath (preserving other parts)
before appending ":CSS" and calling __LoadStyleSheet(response.url).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Duplicate comments:
In `@packages/webpack/externals-loading-webpack-plugin/src/index.ts`:
- Line 341: The catch-path builds a new Error using error.message which can
throw if the thrown value is null/primitive; replace uses of error.message in
the reject(new Error(..., { cause: error })) expression with a safe stringifier
(e.g. const safeMsg = (error && typeof error === 'object' && 'message' in error)
? (error as Error).message : String(error)) and use safeMsg in the constructed
message, and optionally only pass cause when error is an Error instance (e.g.
cause: error instanceof Error ? error : undefined) to harden both occurrences
that currently reference error.message.
- Around line 330-331: Replace the hard-coded "__main-thread" string with the
configured main-thread suffix (mainThreadLayer) when deriving the CSS section
path: change the calls that compute the CSS lookup (the
sectionPath.replace('__main-thread', '') + ':CSS' used before passing to
__LoadStyleSheet) to remove the configured mainThreadLayer instead of the
literal, and apply the same change to the other occurrence that currently uses
"__main-thread"; ensure you remove only the suffix instance of mainThreadLayer
from sectionPath (preserving other parts) before appending ":CSS" and calling
__LoadStyleSheet(response.url).

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0bd3ba9 and c07a9a2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • packages/rspeedy/lynx-bundle-rslib-config/test/external-bundle.test.ts
  • packages/webpack/externals-loading-webpack-plugin/src/index.ts
  • packages/webpack/template-webpack-plugin/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/webpack/template-webpack-plugin/package.json

luhc228
luhc228 previously approved these changes Mar 3, 2026
Comment thread packages/rspeedy/lynx-bundle-rslib-config/package.json Outdated
Comment thread packages/rspeedy/plugin-react/src/css.ts Outdated
@colinaaa colinaaa enabled auto-merge (squash) March 4, 2026 06:28
@colinaaa colinaaa merged commit 4cbf809 into main Mar 4, 2026
79 of 81 checks passed
@colinaaa colinaaa deleted the feat/rslib-css branch March 4, 2026 06:36
colinaaa pushed a commit that referenced this pull request Mar 9, 2026
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/devtool-mcp-server@0.5.0

### Minor Changes

- Use `@lynx-js/devtool-connector` instead of
`@lynx-js/debug-router-connector`.
([#2284](#2284))

The new connector avoids using keep-alive connections, which makes the
connection much more reliable.

- **BREAKING CHANGE**: Remove the `./debug-router-connector` exports.
([#2284](#2284))

## @lynx-js/web-elements@0.12.0

### Minor Changes

- feat: add `willchange` event to `x-viewpager-ng`
([#2305](#2305))

### Patch Changes

- fix: firefox `@supports(width:1rex)`
([#2288](#2288))

- fix: check computed overflow style in `getTheMostScrollableKid` to
avoid treating `overflow: visible` elements as scroll containers
([#2309](#2309))

- fix: the inline-truncation should only work as a direct child of
x-text ([#2287](#2287))

- fix: getVisibleCells cannot work in firefox due to
contentvisibilityautostatechange not propagate list-item
([#2308](#2308))

- fix: foldview stuck issue
([#2304](#2304))

## @lynx-js/gesture-runtime@2.1.3

### Patch Changes

- Optimize gesture callbacks and relationships to prevent unnecessary
gesture registration and rerenders.
([#2277](#2277))

## @lynx-js/react@0.116.5

### Patch Changes

- Improve React runtime hook profiling.
([#2235](#2235))
Enable Profiling recording first, then enter the target page so the
trace includes full render/hydrate phases.

- Record trace events for `useEffect` / `useLayoutEffect` hook entry,
callback, and cleanup phases.
    -   Log trace events for `useState` setter calls.
- Wire `profileFlowId` support in debug profile utilities and attach
flow IDs to related hook traces.
- Instrument hydrate/background snapshot profiling around patch
operations with richer args (e.g. snapshot id/type, dynamic part index,
value type, and source when available).
- Capture vnode source mapping in dev and use it in profiling args to
improve trace attribution.
- Expand debug test coverage for profile utilities, hook profiling
behavior, vnode source mapping, and hydrate profiling branches.

- refactor: call loadWorkletRuntime once in each module
([#2315](#2315))

## @lynx-js/rspeedy@0.13.5

### Patch Changes

- feat: opt-in the web platform's new binary output format
([#2281](#2281))

    Introduce a new flag to enable the new binary output format.

Currently it's an internal-use-only flag that will be removed in the
future; set the corresponding environment variable to 'true' to enable
it.

- Avoid generating `Rsbuild vundefined` in greeting message.
([#2275](#2275))

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.19.8

## @lynx-js/lynx-bundle-rslib-config@0.2.2

### Patch Changes

- Support bundle and load css in external bundle
([#2143](#2143))

## @lynx-js/external-bundle-rsbuild-plugin@0.0.3

### Patch Changes

- Updated dependencies
\[[`c28b051`](c28b051),
[`4cbf809`](4cbf809)]:
    -   @lynx-js/externals-loading-webpack-plugin@0.0.4

## @lynx-js/react-rsbuild-plugin@0.12.10

### Patch Changes

- Support bundle and load css in external bundle
([#2143](#2143))

- Updated dependencies
\[[`59f2933`](59f2933),
[`453e006`](453e006)]:
    -   @lynx-js/template-webpack-plugin@0.10.5
    -   @lynx-js/css-extract-webpack-plugin@0.7.0
    -   @lynx-js/react-webpack-plugin@0.7.4
    -   @lynx-js/react-alias-rsbuild-plugin@0.12.10
    -   @lynx-js/use-sync-external-store@1.5.0
    -   @lynx-js/react-refresh-webpack-plugin@0.3.4

## @lynx-js/web-core-wasm@0.0.5

### Patch Changes

- Updated dependencies
\[[`4963907`](4963907),
[`8fd936a`](8fd936a),
[`0d41253`](0d41253),
[`d32c4c6`](d32c4c6),
[`7518b72`](7518b72),
[`fca9d4a`](fca9d4a)]:
    -   @lynx-js/web-elements@0.12.0

## @lynx-js/externals-loading-webpack-plugin@0.0.4

### Patch Changes

- perf: optimize external bundle loading by merging multiple
`fetchBundle` calls for the same URL into a single request.
([#2307](#2307))

- Support bundle and load css in external bundle
([#2143](#2143))

## @lynx-js/template-webpack-plugin@0.10.5

### Patch Changes

- feat: allow `templateDebugUrl` to be customized via
`output.publicPath` or the `beforeEncode` hook.
([#2274](#2274))

- feat: opt-in the web platform's new binary output format
([#2281](#2281))

    Introduce a new flag to enable the new binary output format.

Currently it's an internal-use-only flag that will be removed in the
future; set the corresponding environment variable to 'true' to enable
it.

-   Updated dependencies \[]:
    -   @lynx-js/web-core-wasm@0.0.5

## create-rspeedy@0.13.5



## @lynx-js/react-alias-rsbuild-plugin@0.12.10



## upgrade-rspeedy@0.13.5

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants